import React from "react"

// components
import TabLayout from "../../layouts/TabLayout/TabLayout"
import OnLive from "./OnLive/OnLive"
import GameCollections from "./GameCollections/GameCollections"

// layout
import AppLayout from "../../layouts/AppLayout"
import ColorBgLayout from "../../layouts/ColorBgLayout/ColorBgLayout"

// stylesheet
import './video.css'
import DownloadHint from "../../shared-components/DownloadHint/DownloadHint";
import {GlobalStore} from "../../context";
import withDownload from "../../high-order-component/withDownload/withDownload";
import {exp} from "../../redux/exp";

class VideoContainer extends React.Component {

    constructor(props) {
        super(props)
        this.state = {
            downloadShow: true,
        }
    }

    componentDidMount() {
        this.setDownloadShow()
    }

    setDownloadShow = () => {
        const downloadShow = this.context.downloadApp.show
        this.setState({
            downloadShow,
        })
    }

    hidden = () => {
        this.context.downloadApp.hidden()
        this.setState({
            downloadShow: false,
        })
    }




    render() {
        const tabs = [
            // {title:'正在直播', active: true,},
            {title:'赛事集锦', active: true,},
        ]
        const download = this.state.downloadShow
        // const download = this.props.downloadShow

        return (
            <AppLayout>
                {download ? <DownloadHint onHidden={this.hidden}/> : null}
                <GameCollections
                    downloadShow={download}
                />
            </AppLayout>
        )
    }

    // tabs

}
VideoContainer.contextType = GlobalStore

// export default withDownload(VideoContainer)
export default VideoContainer

